import { Redirect } from 'umi';

export default (props) => {
  const random = Math.random() * 10;
  console.log('props children', random);
  if (random > 5) {
    return <h2>{props.children}</h2>;
  } else {
    return <Redirect to="/login" />;
  }
};
